package com.example.job.domain.exam;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.example.core.domain.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;


/**
* <p>
*
* </p>
*
* @author 49940
* @date 2024年01月16日 16:02:55
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_exam")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Exam extends BaseEntity {

	@JsonSerialize(using = ToStringSerializer.class)
	@TableId(value = "EXAM_ID", type = IdType.ASSIGN_ID)
	@Schema(description = "竞赛id")
	private Long examId;

	@Schema(description = "竞赛标题")
	private String title;

	@Schema(description = "竞赛开始时间")
	private LocalDateTime startTime;

	@Schema(description = "竞赛结束时间")
	private LocalDateTime endTime;

	private Integer status;

	public Exam(Long examId) {
		this.examId = examId;
	}
}